home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / zc / std.h < prev    next >
C/C++ Source or Header  |  1989-03-08  |  626b  |  20 lines

  1. #define NEW(typ) (typ*)AllocMem((long)sizeof(typ),0L)
  2. #define FREE(p,typ) FreeMem(p,(long)sizeof(typ))
  3.  
  4. #define NEW_N(typ,n) (typ*)AllocMem((long)((n)*sizeof(typ)),0L)
  5. #define FREE_N(p,typ,n) FreeMem(p,(long)((n)*sizeof(typ)))
  6.  
  7. #define NEW_X(typ,x) (typ*)AllocMem((long)(sizeof(typ)+(x)),0L)
  8. #define FREE_X(p,typ,x) FreeMem(p,(long)(sizeof(typ)+(x)))
  9.  
  10. #define FREI(p) FreeMem(p,(long)sizeof(*p))
  11.  
  12. #ifndef FINAL_VERSION
  13. #define ASSERT(c) if (!(c)) printf ("assert failure in %s (%s : %d)\n", \
  14.    __FUNC__,__FILE__,__LINE__)
  15. #else
  16. #define ASSERT(c)
  17. #endif
  18.  
  19. #define MAKE_ID(a,b,c,d) (((long)a<<24)|((long)b<<16)|((long)c<<8)|d)
  20.